﻿using System.Web.Optimization;

namespace Teleware.Newbe.Navigation.Web
{
    public class BundleConfig
    {
        public static readonly string CssCommon = "~/bundle/css/common";
        public static readonly string CssIview = "~/bundle/css/iview";
        public static readonly string JsJquery = "~/bundle/js/jquery";
        public static readonly string JsAbp = "~/bundles/js/abp";
        public static readonly string CssAmaze = "~/bundles/css/amaze";
        public static readonly string JsAmaze = "~/bundles/js/amaze";
        public static readonly string JsVue = "~/bundles/js/vue";
        public static readonly string JsUnderscore = "~/bundles/js/underscore";
        public static readonly string JsIview = "~/bundles/js/iview";

        public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle(JsJquery).Include(
                "~/Scripts/jquery-{version}.js"));

            bundles.Add(
                new StyleBundle(CssIview)
                    .Include("~/node_modules/iview/dist/styles/iview.css", new CssRewriteUrlTransform())
            );

            bundles.Add(
                new StyleBundle(CssCommon)
                    .Include("~/Content/toastr.min.css")
                    .Include("~/Scripts/sweetalert/sweet-alert.css")
                    .Include("~/Content/font-awesome.min.css", new CssRewriteUrlTransform())
            );



            //~/Bundles/vendor/bottom (Included in the bottom for fast page load)
            bundles.Add(
                new ScriptBundle(JsAbp)
                    .Include(
                        "~/Scripts/moment-with-locales.min.js",
                        "~/Scripts/jquery.blockUI.js",
                        "~/Scripts/toastr.min.js",
                        "~/Scripts/sweetalert/sweet-alert.min.js",
                        "~/Scripts/others/spinjs/spin.js",
                        "~/Scripts/others/spinjs/jquery.spin.js",
                        "~/Abp/Framework/scripts/abp.js",
                        "~/Abp/Framework/scripts/libs/abp.jquery.js",
                        "~/Abp/Framework/scripts/libs/abp.toastr.js",
                        "~/Abp/Framework/scripts/libs/abp.blockUI.js",
                        "~/Abp/Framework/scripts/libs/abp.sweet-alert.js",
                        "~/Abp/Framework/scripts/libs/abp.spin.js"
                    )
            );

            bundles.Add(new ScriptBundle(JsAmaze).Include(
                "~/Scripts/amazeui/js/amazeui.js"
            ));

            bundles.Add(new StyleBundle(CssAmaze).Include(
                "~/Scripts/amazeui/css/amazeui.css"));

            bundles.Add(new ScriptBundle(JsVue).Include(
                "~/node_modules/vue/dist/vue.js"));

            bundles.Add(new ScriptBundle(JsUnderscore).Include(
                "~/Scripts/underscore.js"));

            bundles.Add(new ScriptBundle(JsIview).Include(
                "~/node_modules/iview/dist/iview.js"));
        }
    }
}
